#ifndef MAINBOX_H
#define MAINBOX_H

#include <QWidget>
#include <QDebug>
#include <QPushButton>
#include <QTextBrowser>
#include <QGridLayout>
#include <QDateTime>
#include <QLineEdit>
//防止槽函数冲突，此处必须预处理
#undef slots
#include "Python.h"
#define slots Q_SLOTS

QT_BEGIN_NAMESPACE
namespace Ui { class MainBox; }
QT_END_NAMESPACE

class MainBox : public QWidget
{
    Q_OBJECT

public:
    MainBox(QWidget *parent = nullptr);
    ~MainBox();

private:
    Ui::MainBox *ui;

    QTextBrowser *m_logbrowser = new QTextBrowser(this);
    QPushButton *m_testbtn = new QPushButton("测试",this);
    QPushButton *m_writeLog = new QPushButton("log写入");
    QLineEdit *m_inputLogMsg = new QLineEdit(this);
    QGridLayout *m_gridlayout = new QGridLayout(this);
    bool b_color = true;

    void ui_init(void);
    void showlog(QString text);
    void py_init(void);
    void Py_Tester(void);
public
    slots:
    void debug();
};
#endif // MAINBOX_H
